<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        body,html{
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: gray;
            perspective: 2000px;
            transform-style: preserve-3d;
        }
        .content{
            border-radius: 30px;
            overflow: hidden;
            width: 500px;
            height: 700px;
            user-select: none;
            transform-style: preserve-3d;
            perspective: 2000px;
        }
        .content:hover > .one{
            transform: rotateY(180deg);
        }
        .content:hover > .two{
            transform: rotateY(0deg);
        }
        
        .one{
            transform: rotateY(0deg);
        }
        .two{
            transform: rotateY(-180deg);
            backface-visibility: hidden;
        }
        .one,.two{
            perspective: 2000px;
            transform-style: preserve-3d ;
            position: absolute;
            width: 100%;
            height: 100%;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            align-items: center;
            transition: all 1.5s ease-in-out;
        }
        .img{
            z-index: -1;
            position: absolute;
            width: 100%;
            height: 100%;
            filter: grayscale(40%);
        }
        h1{
            font-size: 50px;
            letter-spacing: 5px;
            color: white;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            transform: translateZ(50px);
            backface-visibility: hidden;
        }
        p{
            font-family: Verdana, Geneva, Tahoma, sans-serif;
            padding: 10px;
            border: 1px solid white;
            color: white;
            font-size: 20px;
            animation: ainimation 3s ease-in-out 0s infinite reverse none;
        }
        @keyframes ainimation {
            0%{
                text-shadow: 0 0 15px rgb(255, 255, 255);
                box-shadow:  0 0 25px white;
            }
            50%{
                text-shadow: 0 0 0 rgb(255, 255, 255);
                box-shadow:  0 0 0px white;
            }
            100%{
                text-shadow: 0 0 15px rgb(255, 255, 255);
                box-shadow:  0 0 25px white;
            }
        }
    </style>
</head>
<body>
    <div class="content">
        <div class="one">
            <img src="./img/card1.jpg" alt="第一个背景图" class="img">
            <h1>Hello world!</h1>
            <p>Hover Me</p>
        </div>
        <div class="two">
            <img src="./img/card2.jpg" alt="第二个背景图"  class="img">
             <h1>你好世界!</h1>
        </div>
    </div>
</body>
</html>